<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>test1</h1>
<ul>
    {% for item in v %}
        <li> {{ item.id }}-{{ item.caption }}-{{ item.code }}</li>
    {% endfor %}
</ul>
<h1>test2</h1>
<ul>
    {% for item in v1 %}
        <li> {{ item.id }}-{{ item.caption }}</li>
    {% endfor %}
</ul>

</body>
</html>